import { constants } from './index';

const domain = {
	DEV: {
		test: 'https://twebapi.biblewin.com',
		prod: 'https://webapi.biblewin.com'
	},
	WS: {
		test: 'wss://qaengine-2.aibanaba.com/chat',
		prod: 'wss://qaengine-2.aibanaba.com/chat'
	},
	UNDEV: {
		test: 'https://qaengine-2.biblewin.com',
		prod: 'https://qaengine-1.biblewin.com'
	},
	INTERFACE: {
		test: 'https://tserviceapi.biblewin.com',
		prod: 'https://serviceapi.biblewin.com'
	},
}

const config = {
	img: 'https://img.biblewin.com',
	pc: 'https://www.biblewin.com',
	m: 'https://m.biblewin.com',
	AUDIO: 'https://biblewin.blob.core.windows.net'
};

if (constants.MODE == 'dev') {
// #ifdef APP-PLUS
	config['DEV'] = domain['DEV']['test'];           // php接口测试
	config['UNDEV'] = domain['UNDEV']['test']; 
	config['WS'] = domain['WS']['test']; 
	config['INTERFACE'] = domain['INTERFACE']['test']; // go接口测试
	config['AUDIO'] = 'https://biblewin.blob.core.windows.net';
// #endif
// #ifndef APP-PLUS
	config['DEV'] = '/dev';
	config['UNDEV'] = '/un-dev';
	config['WS'] = domain['WS']['test']; 
	config['INTERFACE'] = '/unDev'; 
	// config['AUDIO'] = '/audio-dev';
// #endif
}

if (constants.MODE == 'prod') {
	config['DEV'] = domain['DEV']['prod'];           // php接口测试
	config['UNDEV'] = domain['UNDEV']['prod']; 
	config['WS'] = domain['WS']['prod']; 
	config['INTERFACE'] = domain['INTERFACE']['prod']; // go接口测试
	config['AUDIO'] = 'https://biblewin.blob.core.windows.net';
}

export { config, domain };
